package com.googlecode.continuity.core.client.rpc;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;

/**
 * ConfigurationRPC
 *
 * todo: remove/replace
 * @deprecated requires reworking the configuration system
 * @author Peter Schmitt <aragos@aragos.de>
 */
public interface ConfigurationRPC extends RemoteService {
  /**
   * Set a list of confoguration entries to new values.
   *
   * @param entries a list of configuration entries to be set
   * @gwt.typeArgs entries <com.googlecode.continuity.core.client.ConfigurationEntry>
   */
  void setConfigurations(List entries);

  /**
   * Get the configuration value for supplied configuration code.
   *
   * @param code a configuration code
   * @return the corresponding configuration value
   */
  String getValue(String code);

  /**
   * Convenience method, returns a configuration value for the supplied configuration code
   * that has been converted to an integer.
   *
   * @param code configuration code
   * @return the corresponding configuration value as integer
   */
  int getValueInteger(String code);

  /**
   * Get entry instances for a list of configuration entry identifiers.
   *
   * @param codes the codes to be resolved
   * @return list of configuration entries for supplied identifiers
   * @gwt.typeArgs codes <java.lang.String>
   * @gwt.typeArgs <com.googlecode.continuity.core.client.ConfigurationEntry>
   */
  List getConfigurations(List codes);
}
